package com.jron.cqiu.kernel.cmdline;

import org.apache.commons.cli.Options;
import org.apache.commons.cli.HelpFormatter;


/**
 * Created by Intellij IDEA.
 *
 * @Author: Yejw
 * @Date: 2008-6-23
 * @Time: 13:00:32
 */
public class Command implements IKingCommand, IDefined {

    public void help() {
        HelpFormatter hf = new HelpFormatter();
        hf.printHelp(80, USAGE, null, kingOptions(), FOOTER);
    }

    public Options kingOptions() {
        return new Options().
                addOption(mailOrder, "mail-order", true, "| king -mo orderFrom order orderArg1 orderArg2 ... | transferring a mail order").
                addOption(quit, "quit", false, "exit king system").
                addOption(kingHelp, "king-help", true, "| king -kh [helpTo] | get a piece of king help for the mail order").
                addOption(help, "help", false, "show helps for the king command").
                addOption(runningKing, "king", false, "runing king");
    }

}
